#include<iostream>
#include<vector>
using namespace std;


bool searchVal(vector<int>::iterator beg, vector<int>::iterator end, int val)
{
	while (beg != end)
	{
		if (*beg == val)
		{
			return 1;
	}
		beg++;
	}
	return 0;
}

int main()
{
	vector<int>alist = { 1,3,5,6,9,10 };
	cout << searchVal(alist.begin(), alist.end(), 10) << endl;
	return 0;
}